<template>
  <div>
    <ol class="breadcrumb-nav">
  			<li>
  				<a href="">主页</a>
  			</li>
  			<li>轮播图列表</li>
  		</ol>
  		<div class="pd-20">
  			<table class="table table-h table-border table-bg table-bordered mt-20">
  				<thead>
  					<tr>
  						<th style="width:50px">序号</th>
  						<th>缩略图</th>
  						<th>标题</th>
  						<th>发布时间</th>
  						<th>排序</th>
  						<th>链接</th>
  						<th style="width:150px">操作</th>
  					</tr>
  				</thead>
  				<tbody class="text-c">
  						<tr v-for="list in banner">
                <td>{{$index+1}}</td>
                <td>
                  <img :src="list.img">
                </td>
                <td>{{list.title}}</td>
  							<td>{{list.releaseTime}}</td>
  							<td>{{list.sort}}</td>
  							<td>{{list.href}}</td>
  							<td>
                  <a v-link="{path:'/bannerForm?id='+list._id}">编辑</a>
  								<a href="javascript:;" @click="delArticle(list)" class="delete-btn">删除</a>
  							</td>
  						</tr>
  				</tbody>
  			</table>
  		</div>
  		<div class="pd-20">
  			<a v-link="{path:'/bannerForm'}" class="btn btn-submit">添加轮播</a>
  		</div>
  </div>
</template>
<script type="text/javascript">
  export default{
    data(){
      return {
        banner:{}
      }
    },
    route:{
      data(transition){
        this.$http.get("/getBanner" , function(res){
          transition.next({banner:res.banner});
        },"JSON")
      }
    }
  }
</script>
<style >
  .text-c img{
    width:70px;
    font-size:0;
    line-height:0;
    display:inline-block;
  }
</style>
